<html>

<head>

<style type="text/css">
@import "http://planet.math.uwaterloo.ca/javascripts/dojo/dijit/themes/soria/soria.css";
@import "http://planet.math.uwaterloo.ca/javascripts/dojo/dijit/themes/tundra/tundra.css";
@import "http://planet.math.uwaterloo.ca/javascripts/dojo/dojox/grid/resources/Grid.css";
@import "http://planet.math.uwaterloo.ca/javascripts/dojo/dojox/grid/resources/tundraGrid.css";
</style>

<!-- load the dojo toolkit base -->
<SCRIPT TYPE="text/javascript" SRC="http://planet.math.uwaterloo.ca/javascripts/dojo/dojo/dojo.js" djConfig="parseOnLoad: true"></SCRIPT>

<script>
dojo.require("dojox.grid.DataGrid");
dojo.require("dojox.data.XmlStore");

var layoutBrowse = [
    [
      { field: "id", name: "ID", width: 6 },
      { field: "title", name: "Title", width: 'auto' },
      { field: "authors", name: "Authors", width: 'auto' },
      { field: "modified", name: "Modified", width: 'auto' },
      { field: "tags", name: "Tags", width: 'auto' }
    ]
]; 
  
</script>

<script>
function processData( type, data, evt ) {
	//the data is xml
    var msg = "Data dump:\n" + data;
    alert( msg );
}

function getData() {
	var loc = "http://planet.math.uwaterloo.ca/?op=getobjmetadatabytagsxml&tags=NS:published";
	dojo.xhrGet({
	    url: loc,
	    load: processData,
            error: function(type, error){ alert(error); },
	    handleAs: "xml"
	});
}
</script>
<title>Noosphere Tag Search Interface</title>
</head>
<body class="tundra">
<h1>Noosphere Tag Search Interface</h1>

<form action="http://planet.math.uwaterloo.ca/" method="get">
Tags of interest (comma seperated): <input name="tags"></input>
<input name="op" type="hidden" value="dojotest"/>
<input type="submit" value="Search"/>
</form>

<div dojoType="dojox.data.XmlStore" url="http://planet.math.uwaterloo.ca/?op=getobjmetadatabytagsxml&tags=NS:published" jsId="objectStore" label="title"></div>

<div id="Div1" style="width: 800px; height: 500px;"
  dojoType="dojox.grid.DataGrid"
  store="objectStore"
  structure="layoutBrowse"
  query="{}"
  rowsPerPage="40">
</div>
</body>

</html>
